#!/usr/bin/env python
#-*- coding:utf-8 -*-
m = 'm'
def my_func():
    d = 1
    c = 2
    def inner_fun():
        a = 1
        b = 1
        global d
        d = 2
        print d
    inner_fun()
    print 'outer func %s ' %  d #内部函数并没有修改外部函数的值
    print vars()
    
 
#print vars()
if __name__ == '__main__':
    my_func()
